<template>
  <ul class="pegs">
    <li class="person" @click="toGrzx"><i></i><span>个人中心</span></li>
    <li class="goods">
      <i></i><span>购物车</span><b>{{ num }}</b>
    </li>
  </ul>
</template>

<script>
export default {
  name: 'pegs',
  data() {
    return {
      num: 10,
    };
  },
  methods: {
    toGrzx() {
      this.$router.replace('/grzx/wdzh');
    },
  },
};
</script>

<style scoped>
.pegs {
  width: 270px;
  display: flex;
  color: #666;
  font-size: 14px;
  justify-content: flex-end;
}
.pegs li {
  margin-top: 24px;
  width: 123px;
  height: 40px;
  line-height: 40px;
  border: 1px solid #e5e5e5;
  margin-left: 20px;
  cursor: pointer;
  position: relative;
}
.pegs li b {
  position: absolute;
}
.pegs li i {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: -4px;
  margin-right: 4px;
  box-sizing: border-box;
}
.person i {
  background: url('./person.png') no-repeat center;
}
.goods i {
  background: url('./goods.png') no-repeat center;
}
.goods b {
  width: 22px;
  height: 22px;
  background: url('./rec-bubble.png') no-repeat 0;
  left: 40px;
  top: -10px;
  font-size: 12px;
  color: #fff;
  line-height: 22px;
}
</style>
